package com.sfy.auth.common.enums;

import lombok.Getter;

@Getter
public enum AuthUserStatusEnum {
    OPEN(0, "启用"),
    COLSE(1, "禁用");

    private int code;

    private String desc;

    AuthUserStatusEnum(int code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public static AuthUserStatusEnum getByCode(int codeVal) {
        for (AuthUserStatusEnum categoryTypeEnum : AuthUserStatusEnum.values()) {
            if (categoryTypeEnum.code == codeVal) {
                return categoryTypeEnum;
            }
        }
        return null;
    }
}
